package com.liuyucheng.idea_springboot.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.util.Date;

/**
 * @author LiuYuCheng
 * @date 2021年12月29日 16:32
 */
@Slf4j
@Configuration
@EnableScheduling
public class SpringTask {

//    @Scheduled(cron = "5 * * * * ?")
    private void doTask(){
        log.info("定时任务demo{}",new Date());
    }
}
